Decentralized identifiers (DIDs) are a new type of identifier that enables verifiable, decentralized digital identity. A DID refers to any subject (e.g., a person, organization, thing, data model, abstract entity, etc.) as determined by the controller of the DID.
Verifiable Credential 是由 w3c 推出的可验证凭证协议。
Credentials are a part of our daily lives; driver's licenses are used to assert that we are capable of operating a motor vehicle, university degrees can be used to assert our level of education, and government-issued passports enable us to travel between countries. This specification provides a mechanism to express these sorts of credentials on the Web in a way that is cryptographically secure, privacy respecting, and machine-verifiable.
在现有的实践中,二者经常被一同实践。但实际上,这两套协议也并非绑定的,我们完全可以用 DID + SBT来替代DID + VC。
0x02 设计思路
像羽毛一样轻。
一个 MVP(最小可用版本)的 DID 至少包含如下几个组成部分:
DID Syntax(DID 标识符)
https://www.w3.org/TR/did-core/#did-syntax
DID Document in JSON(JSON 格式的 DID 描述文档)
Address Aggregator 地址聚合器
Endpoint Aggregator 终端服务聚合器
在进行任意的 dApp 实践的时候,设计者都首先要问自己一个问题:
把哪些部分放到链上?把哪些部分放到链下?
这个问题遵循一个即可:
让链上设计尽可能的轻
以 DID 为例,我们可以看到很多 DID 的实现都会把链上搞得过重。事实上,对于 MVP 版本来说,我们在链上实现如下两个模块即可: